MIME Types settings

    MIME (Multipurpose Internet Mail Extensions) is an Internet standard for specifying what happens when a Web browser requests a file with certain characteristics.

    MIME allows Web servers and browsers to act appropriately when a file is requested. In the Mac OS, the action is based on a combination of the file's suffix, file type, and creator code. Each combination is called a "MIME type mapping."

Suffixes

    A suffix describes the type of data that's in a file. Suffixes begin with a period followed by letters. Here are some examples:
    .txt for text files
    .cgi for common gateway interface files
    .gif for GIF (graphics) files
    .au for sound files
    .tiff for TIFF (graphics) files

Types

    The name of the MIME mapping includes two subfields separated by a slash (/) (for example, "text/plain"). To add or change a MIME type mapping, you may need to know the file type and creator code for a file. To get this information, you can use the program ResEdit, available from Apple Computer.

    To use ResEdit to find a file type and creator code:
    1 Locate the ResEdit icon on your computer, then drag the file to the ResEdit icon.
    2 When ResEdit opens, open the File menu and choose Get Info.
    The file type and creator code are displayed in the Type and Creator boxes.

Creator

    The creator is a 4-byte code indicating the application that created the file (for example, TTXT) or an asterisk (*) to indicate any creator.

Web Server Responses

    When a file is requested, the Web program handles the file using the MIME mapping that matches best:
    A literal match takes precedence over a wild card (*) match.
    The program uses the mapping that has the most matches with the file.
    If two or more mappings have the same number of matches, the program uses the mapping that matches the file's suffix.

    Possible responses include:
    Return file as MIME type
    Encode file in MacBinary
    Encode file in BinHex
    Execute file as CGI
    Handle file using plug-in <you specify plug-in name>
    Execute file <you specify filename>

Related topics

 


Table of contents